package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;

import java.util.List;

@Data
public class MealOrderVO extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;
    /** 培训ID */
    private Long trainingId;
    /** 培训名称 */
    private Long emplyeeId;
    @Excel(name = "培训名称")
    private String trainingName;

    /** 员工姓名 */
    @Excel(name = "员工姓名")
    private String employeeName;

    /** 员工编号 */
    @Excel(name = "员工编号")
    private String employeeNo;

    /** 性别 */
    @Excel(name = "性别")
    private String sex;

    /** 部门 */
    @Excel(name = "部门")
    private String dept;

    /** 部门 */
    @Excel(name = "部门名称")
    private String deptName;

    /** 电话 */
    @Excel(name = "电话")
    private String phone;

    /** 邮箱 */
    @Excel(name = "邮箱")
    private String email;

    /** 培训开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startDate;

    /** 培训结束日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    /** 用餐详情列表 */
    private List<MealDetail> mealDetails;
    /** 是否有未订餐记录 */
    private Integer hasUnordered;
    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public Long getEmpId()
    {
        return emplyeeId;
    }

    public void setEmpId(Long emplyeeId)
    {
        this.emplyeeId = emplyeeId;
    }
    public Long getTrainingId()
    {
        return trainingId;
    }

    public void setTrainingId(Long trainingId)
    {
        this.trainingId = trainingId;
    }
    public String getTrainingName()
    {
        return trainingName;
    }

    public void setTrainingName(String trainingName)
    {
        this.trainingName = trainingName;
    }

    public String getEmployeeName()
    {
        return employeeName;
    }

    public void setEmployeeName(String employeeName)
    {
        this.employeeName = employeeName;
    }

    public String getEmployeeNo()
    {
        return employeeNo;
    }

    public void setEmployeeNo(String employeeNo)
    {
        this.employeeNo = employeeNo;
    }

    public String getSex()
    {
        return sex;
    }

    public void setSex(String sex)
    {
        this.sex = sex;
    }

    public String getDept()
    {
        return dept;
    }

    public void setDept(String dept)
    {
        this.dept = dept;
    }

    public String getPhone()
    {
        return phone;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getEmail()
    {
        return email;
    }

    public void setEmail(String email)
    {
        this.email = email;
    }

    public Date getStartDate()
    {
        return startDate;
    }

    public void setStartDate(Date startDate)
    {
        this.startDate = startDate;
    }

    public Date getEndDate()
    {
        return endDate;
    }

    public void setEndDate(Date endDate)
    {
        this.endDate = endDate;
    }

    public List<MealDetail> getMealDetails()
    {
        return mealDetails;
    }

    public void setMealDetails(List<MealDetail> mealDetails)
    {
        this.mealDetails = mealDetails;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("trainingName", getTrainingName())
                .append("employeeName", getEmployeeName())
                .append("employeeNo", getEmployeeNo())
                .append("sex", getSex())
                .append("dept", getDept())
                .append("phone", getPhone())
                .append("email", getEmail())
                .append("startDate", getStartDate())
                .append("endDate", getEndDate())
                .append("mealDetails", getMealDetails())
                .toString();
    }

    /**
     * 用餐详情内部类
     */
    @Data
    public static class MealDetail {
        /** 用餐日期 */
        @JsonFormat(pattern = "yyyy-MM-dd")
        private Date mealDate;

        /** 餐别 (午餐/晚餐) */
        private String mealType;

        /** 是否订餐（1=是,0=否） */
        private Integer isOrdered;

        private Date verifyTime;

        public Date getMealDate() {
            return mealDate;
        }

        public void setMealDate(Date mealDate) {
            this.mealDate = mealDate;
        }

        public String getMealType() {
            return mealType;
        }

        public void setMealType(String mealType) {
            this.mealType = mealType;
        }

        public Integer getIsOrdered() {
            return isOrdered;
        }

        public void setIsOrdered(Integer isOrdered) {
            this.isOrdered = isOrdered;
        }
    }
}